import unittest

from Minion import *

class MinionTests(unittest.TestCase):

    def testMatches(self):
        p = DatePattern(2004, 9, 28)
        d = datetime.date(2004, 9, 28)
        self.failUnless(p.matches(d))
    
    def testRotate(self):
        matrix = [1,0]
        self.failUnless(Minion.rotateMatrix(matrix, 90) == [0,1])


def main():
    unittest.main()

if __name__ == '__main__':
    main()
